// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 标准类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022-06-07
 */
public enum StandardTypeEnum {
    DESIGN_STANDARD(1,"设计标准"),
    TEST_STANDARD(2,"测试标准"),
    SPECIFICATION(3,"规格书"),
    CASE(4,"案例");

    private int value;

    private String name;

    StandardTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        StandardTypeEnum arrObj[] = StandardTypeEnum.values();
        for (StandardTypeEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }
}
